1. Field of the Invention
The present invention relates to a method and apparatus for processing information, capable of maintaining a high processing efficiency even when outputting complicated data, without causing a significant increase in processing complexity.
2. Description of the Related Art
A printing control method and a printing process used in a conventional printing system are described below. A printer and a general-purpose information processing apparatus, such as a personal computer (hereinafter, referred to as a host computer), are generally connected to each other via a Centronics parallel interface, a RS-232C serial interface, a USB (Universal Serial Bus) interface, or a network interface.
In the host computer, application software (hereinafter, referred to simply as an application), such as a word processor or a spreadsheet program, runs on basic software (called an operating system (OS)), such as a Microsoft® Windows® OS (e.g., Windows® 2000, Windows ME®, etc.). When printing is performed by an application, the application program calls a function of a graphic subsystem that is one of subsystems provided by the operating system. The graphic subsystem is responsible for processing image information to be supplied to a display or a printer. In the Microsoft® Windows® operating systems, the graphic subsystem is called a GDI (Graphic Device Interface). In order to handle differences among devices, such as a display or a printer, a module called a device driver is dynamically linked to the GDI, and outputting of data to a specific device is performed via the device driver. A module for use with a printer for the above purpose is called a printer driver. The printer driver has a DDI (Device Driver Interface) that is a set of functions implemented in a device driver to achieve necessary capabilities. When the GDI receives an API (Application Programming Interface) call from an application, the GDI converts the API call into a form adapted to the printer driver and calls a DDI function to perform a printing process. As described above, the GDI sequentially handles print commands received from an application via the printer driver.
Printer drivers can be classified into two types according to the purpose of use: (1) output-to-printer drivers; and (2) output-to-file drivers. An output-to-printer driver is used to output data to a printer having a controller capable of handling control commands described in PDL (Printer Description Language). When the output-to-printer driver receives a draw command from a system via a DDI function, the output-to-printer driver converts the received draw command into a command described in PDL and outputs the command to a printer, which in turn performs printing according to the received command.
An output-to-file driver is used not to send data directly to a printer but to convert a draw command received from a DDI function into a predefined intermediate format and store the result as an intermediate file on a disk system of the host computer. Two widely used intermediate formats are PDF (Portable Document Format) and SVG (Scalable Vector Graphics). An intermediate file stored on the file system of the host computer can be displayed on the host computer using a particular application program capable of handling the intermediate format. If a user issues a command to print the intermediate file, the intermediate file is supplied to the printer via the graphic subsystem, and the printer performs printing.
DDI functions can be classified into three types: (1) logical draw commands associated with text data; (2) logical draw commands associated with graphics data; and (3) logical draw commands associated with image data. In the following discussion, DDI functions associated with image data used in the Microsoft Windows® system are used as examples. The following discussion can also be applied to logical draw commands associated with text data or graphics data. In general, a logical draw command draws an image in a clipping area that defines a valid drawing area in accordance with drawing attribute specified by an application.
For example, when an image 100 shown in FIG. 1A is drawn, a draw command including image data and a clipping area is used as described below. In the example shown in FIG. 1A, the image 100 is drawn by a draw command including, as parameters, image data 101 and a clipping area 102. Note that only the image data 101 and the clipping area 102, which are parameters of the draw command, are shown in FIG. 1A, and the draw command itself is not shown. The image data 101 represents one sheet of rectangular image denoted by hatching. The clipping area 102 represents a valid image area specified by an application. In this case, the draw command including the image data 101 and the clipping area 102 indicates that an image should be generated by clipping the image data 101 with the clipping area 102.
In the conventional technique, when an application specifies a clipping area of image data and prints an image using a graphic subsystem, the printer driver outputs image data and the specified clipping area in accordance with a draw command received via a DDI function from the application. That is, in general, the printer driver outputs a draw command to output an image such as the image 103 and a clip command that defines a clipping area such as the clipping area 104.
A high-performance graphic subsystem is now available which allows an application to represent a complicated image with high resolution and with good halftone. In some complicated image data, the printer driver has to handle a clipping area including as many as 10,000 or more points in a coordinate space of a 600-dpi printer. Although great advances have been made in performance of personal computers and printers, a complicated draw command output by a printer driver can cause a processing system, such as a printer or an application, to have a large processing load that can cause a significant reduction in performance, for example as disclosed in Japanese Patent Laid-Open No. 2003-029938.
As described above, when a logical draw command is received from a DDI, if a received source image such as the image 101 and clipping area such as the clipping area 102 are directly output as image data 103 and clipping area data 104, the data output from the printer driver includes a great number of coordinate points when the clipping area of the image is complicated. This causes a large processing load to be imposed on a processing system (for example, a command interpreter or a renderer of a printer or a graphic engine of a computer) that handles the data received from the printer driver, and a significant reduction can occur in performance of a printing system as a whole.